export const baseUrl='http://localhost:9999'

export function  isEmail(str) {
             var reg = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
            return  reg.test(str);
         }
		 
export function checkPhone(str){ 
	var reg = /^1[3456789]\d{9}$/;
	return  reg.test(str);
}

export function checkToken(token){
	if(token==null){
		uni.showToast({
			icon:'error',
			title:'请先登录'
		})
		uni.navigateTo({
			url:'/pages/login/login'
		})
	}
}